<%@ Control Language="C#" AutoEventWireup="true" Inherits="NopSolutions.NopCommerce.Web.Administration.Modules.PricelistAddControl"
    CodeBehind="PricelistAdd.ascx.cs" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register TagPrefix="nopCommerce" TagName="DecimalTextBox" Src="DecimalTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="NumericTextBox" Src="NumericTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="SimpleTextBox" Src="SimpleTextBox.ascx" %>
<%@ Register TagPrefix="nopCommerce" TagName="ToolTipLabel" Src="ToolTipLabelControl.ascx" %>
<div class="section-header">
    <div class="title">
        <img src="Common/ico-promotions.png" alt="" />
        Add a new pricelist <a href="PriceList.aspx" title="Back to pricelist list">(back to
            pricelist list)</a>
    </div>
    <div class="options">
        <asp:Button ID="SaveButton" runat="server" Text="Save" CssClass="adminButtonBlue"
            OnClick="SaveButton_Click" ToolTip="Save pricelist" />
    </div>
</div>
<ajaxToolkit:TabContainer runat="server" ID="PricelistsTabs" ActiveTabIndex="0">
    <ajaxToolkit:TabPanel runat="server" ID="pnlPricelistInfo" HeaderText="Pricelist Info">
        <ContentTemplate>
            <table class="adminContent">
                <tr>
                    <td class="adminTitle">
                        &nbsp;
                    </td>
                    <td class="adminData">
                        <b>List of allowed message tokens: please be aware, that you can also add formatting
                            conditions (e.g. %pv.price:0.00%), the selected "Format-Localization" will decide
                            which decimal points etc. are used</b>
                        <br />
                        <asp:Label ID="lblAllowedTokens" runat="server" />
                        <br />
                        <br />
                        The pricelist can be requested by "http://www.yourStore.com/Pricelist.csv?PricelistGuid=abc"
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblDIsplayName" Text="Display name:"
                            ToolTip="The pricelist display name." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <nopCommerce:SimpleTextBox runat="server" ID="txtDisplayName" CssClass="adminInput"
                            ErrorMessage="Display name is required" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblShortName" Text="Short name:" ToolTip="The pricelist short name."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtShortName" CssClass="adminInput" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPricelistGUID" Text="Pricelist GUID:"
                            ToolTip="The pricelist GUID." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtPricelistGuid" CssClass="adminInput" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblHeader" Text="Exportfile header:"
                            ToolTip="The pricelist exportfile header." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtHeader" CssClass="adminInput" Width="100%" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblBody" Text="Exportfile body:" ToolTip="The pricelist exportfile body."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <nopCommerce:SimpleTextBox runat="server" ID="txtBody" CssClass="adminInput" Width="100%"
                            ErrorMessage="Exportfile body is required" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblFooter" Text="Exportfile footer:"
                            ToolTip="The pricelist exportfile footer." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtFooter" CssClass="adminInput" Width="100%" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblExportMode" Text="Export mode:" ToolTip="The pricelist export mode."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlExportMode" CssClass="adminInput" runat="server" AutoPostBack="true"
                            OnSelectedIndexChanged="ddlExportMode_SelectedIndexChanged" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblExportType" Text="Export type:" ToolTip="The pricelist export type."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlExportType" CssClass="adminInput" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblAffiliate" Text="Affiliate:" ToolTip="The associated affiliate."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlAffiliate" CssClass="adminInput" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblFormatLocalization" Text="Format localization:"
                            ToolTip="The pricelist exportfile header." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlFormatLocalization" CssClass="adminInput" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblCacheTime" Text="Cache time:" ToolTip="The pricelist cache time."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <nopCommerce:NumericTextBox runat="server" ID="txtCacheTime" CssClass="adminInput"
                            MinimumValue="0" MaximumValue="64000" Value="0" RangeErrorMessage="The value must be from 0 to 64000"
                            RequiredErrorMessage="Cache time is required" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblDescription" Text="Description:"
                            ToolTip="The pricelist description." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox ID="txtDescription" runat="server" CssClass="adminInput" Width="99%"
                            TextMode="MultiLine" Rows="5" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblAdminNotes" Text="Admin notes:" ToolTip="Admin notes relating to this pricelist."
                            ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:TextBox runat="server" ID="txtAdminNotes" CssClass="adminInput" Width="99%"
                            TextMode="MultiLine" Rows="5" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblOverride" Text="Override price adjustments:"
                            ToolTip="Pricelist override price adjustments." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:CheckBox ID="chkOverrideIndivAdjustment" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPriceAdjustmentType" Text="Price adjustment type:"
                            ToolTip="Type of price adjustment" ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <asp:DropDownList ID="ddlPriceAdjustmentType" runat="server" CssClass="adminInput" />
                    </td>
                </tr>
                <tr>
                    <td class="adminTitle">
                        <nopCommerce:ToolTipLabel runat="server" ID="lblPriceAdjustment" Text="Price adjustment:"
                            ToolTip="The price adjustment to make." ToolTipImage="~/Administration/Common/ico-help.gif" />
                    </td>
                    <td class="adminData">
                        <nopCommerce:DecimalTextBox ID="txtPriceAdjustment" runat="server" CssClass="adminInput"
                            MinimumValue="0" MaximumValue="999999" Value="0" RequiredErrorMessage="Price adjustment is required"
                            RangeErrorMessage="The value must be from 0 to 999999" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
    <ajaxToolkit:TabPanel runat="server" ID="pnlProductVariants" HeaderText="Product Variants">
        <ContentTemplate>
            <asp:GridView ID="gvProductVariants" runat="server" OnRowDataBound="gvProductVariants_RowDataBound"
                AutoGenerateColumns="false">
                <Columns>
                    <asp:TemplateField HeaderText="Product variant">
                        <ItemTemplate>
                            <asp:CheckBox ID="chkSelected" runat="server" />
                            <asp:Label ID="lblFullProductName" runat="server" Text='<%# Eval("FullProductName") %>' />
                            <asp:HiddenField ID="hfProductVariantID" runat="server" Value='<%# Eval("ProductVariantID") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Price adjustment type">
                        <ItemTemplate>
                            <asp:DropDownList ID="ddlPriceAdjustmentType" runat="server" CssClass="adminInput" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Price adjustment">
                        <ItemTemplate>
                            <nopCommerce:DecimalTextBox ID="txtPriceAdjustment" runat="server" CssClass="adminInput"
                                Value="0" MinimumValue="0" MaximumValue="999999" RequiredErrorMessage="Price adjustment is required"
                                RangeErrorMessage="The value must be from 0 to 999999" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    No product variants
                </EmptyDataTemplate>
            </asp:GridView>
        </ContentTemplate>
    </ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>